package com.liusand.mapper;

import com.liusand.dto.AddressBookDto;
import com.liusand.pojo.AddressBook;
import com.liusand.vo.AddressBookVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :liusha
 * packageName :com.liusand.mapper
 * fileName :AddressBookMapper
 * creationTime :2022/12/5 16:56
 */
@Mapper
public interface AddressBookMapper {
    List<AddressBookVo> list();

    AddressBookVo selectAddressBooktById(@Param("id") String id);

    AddressBookVo selectDefaultAddressBook();

    int updateDefaultAddressBook(@Param("id") String id, @Param("isDefault") Integer isDefault);

    int insertAddressBookt(@Param("addressBook") AddressBook addressBook);

    int updateAddressBook(@Param("addressBook") AddressBook addressBook);

    int deleteAddressBooksByIds(@Param("idList") List<String> idList);
}

